package com.github.xiaolyuh.entity;

import com.alibaba.fastjson.annotation.JSONField;

public class MqMessageModel {

    /**
     * 站点
     */
    private String siteCode;
    /**
     * 消息id
     */
    private String msgId;

    /**
     * 消息类型
     */
    private Integer type;

    /**
     * 消息内容
     */
    private String content;

    /**
     * 最大重试次数
     */
    @JSONField(serialize = false)
    private Integer maxRetryTimes=3;

    /**
     * 已经重试的次数
     */
    @JSONField(serialize = false)
    private Integer retriedTimes=0;

    public MqMessageModel(String siteCode, String msgId, Integer type, String content) {
        this.siteCode=siteCode;
        this.msgId = msgId;
        this.type = type;
        this.content = content;
    }

    public String getMsgId() {
        return msgId;
    }

    public Integer getType() {
        return type;
    }

    public String getContent() {
        return content;
    }

    public Integer getMaxRetryTimes() {
        return maxRetryTimes;
    }

    public void setMaxRetryTimes(Integer maxRetryTimes) {
        this.maxRetryTimes = maxRetryTimes;
    }

    public Integer getRetriedTimes() {
        return retriedTimes;
    }

    public void setRetriedTimes(Integer retriedTimes) {
        this.retriedTimes = retriedTimes;
    }

    public String getSiteCode() {
        return siteCode;
    }
}
